<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>SFSBuddy Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">SFS2X API v1.3.7 </a></h1>
				<a id="developerHome" href="../index.html">gotoAndPlay() / A51 Integrated</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">SFSBuddy Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	<option value="properties">Properties</option>
	
	<option value="//api/name/id">&nbsp;&nbsp;&nbsp;&nbsp;id</option>
	
	<option value="//api/name/isBlocked">&nbsp;&nbsp;&nbsp;&nbsp;isBlocked</option>
	
	<option value="//api/name/isOnline">&nbsp;&nbsp;&nbsp;&nbsp;isOnline</option>
	
	<option value="//api/name/isTemp">&nbsp;&nbsp;&nbsp;&nbsp;isTemp</option>
	
	<option value="//api/name/name">&nbsp;&nbsp;&nbsp;&nbsp;name</option>
	
	<option value="//api/name/nickName">&nbsp;&nbsp;&nbsp;&nbsp;nickName</option>
	
	<option value="//api/name/state">&nbsp;&nbsp;&nbsp;&nbsp;state</option>
	
	<option value="//api/name/variables">&nbsp;&nbsp;&nbsp;&nbsp;variables</option>
	
	
	
	
	
	
	<option value="instance_methods">Instance Methods</option>
	
	<option value="//api/name/containsVariable:">&nbsp;&nbsp;&nbsp;&nbsp;- containsVariable:</option>
	
	<option value="//api/name/getOfflineVariables">&nbsp;&nbsp;&nbsp;&nbsp;- getOfflineVariables</option>
	
	<option value="//api/name/getOnlineVariables">&nbsp;&nbsp;&nbsp;&nbsp;- getOnlineVariables</option>
	
	<option value="//api/name/getVariable:">&nbsp;&nbsp;&nbsp;&nbsp;- getVariable:</option>
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>




<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/id">id</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isBlocked">isBlocked</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isOnline">isOnline</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isTemp">isTemp</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/name">name</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/nickName">nickName</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/state">state</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/variables">variables</a></span></li>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/containsVariable:">containsVariable:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getOfflineVariables">getOfflineVariables</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getOnlineVariables">getOnlineVariables</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/getVariable:">getVariable:</a></span></li>
	
</ul></li>


			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="SFSBuddy Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">SFSBuddy Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value">NSObject</td>
</tr><tr>
	<td class="specification-title">Conforms to</td>
	<td class="specification-value"><a href="../Protocols/Buddy.html">Buddy</a></td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">SFSBuddy.h<br />SFSBuddy.m</td>
</tr>
						</tbody></table></div>
					
                    
                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>The SFSBuddy class represent a <a href="../Protocols/Buddy.html">Buddy</a> in the User&rsquo;s <b>Buddy List</b>.</p>

<p>Each Buddy has several properties:</p>

<ul>
<li><b>name</b>: the name of the Buddy, corresponds to the User name</li>
<li><b>nickname</b>: an optional nickname (default = null)</li>
<li><b>isOnline</b>: whether the Buddy is online in the Buddy system or not</li>
<li><b>state</b>: a string representing a &ldquo;state message&rdquo;, such as: <i>Available</i>, <i>Busy</i>&hellip;</li>
<li><b>isBlocked</b>: whether the Buddy is blocked in the User Buddy List</li>
<li><b>isTemp</b>: a temporary Buddy is not stored in the Buddy List, it will be removed at the end of the session (see below)</li>
<li><b>variables</b>: the Buddy variables which can be transient or persistent (see below)</li>
</ul>


<p><b>Online State</b><br/>
Any user can decide if they want to be online/off-line as Buddy in the Buddy system. By default a User is online
every time he joins the Zone, but the User can also turn off this flag at runtime and disappear from other User&rsquo;s buddy lists.
The <b>Online State</b> is persistent and based on a reserved Buddy Variable.</p>

<p><b>Blocked Buddies</b><br/>
Buddies that are blocked won&rsquo;t be able to send any messages to the User, also they won&rsquo;t be able to see if the Buddy is online/off-line.</p>

<p><b>Buddy State message</b><br/>
The state message represents a typical IM Buddy state such as Available, Busy etc&hellip;
By default the system already provides 3 default states: <b>Available</b>, <b>Away</b>, <b>Occupied</b> which can be changed or enriched at any time
The state message is based on a reserved Buddy Variable.</p>

<p><b>Temp Buddy</b><br/>
A temporary Buddy is added to the User List when another User adds me to his Buddy List.
This way we can see each others and exchange messages.
If I don&rsquo;t add the User as Buddy in my list the User will remain temporary and it won&rsquo;t be persisted.</p>

<p><b>Variables</b><br/>
Buddy Variables enable each Buddy to show/send updates for specific informations to each User that has the Buddy in the list.
For example one could send real-time updates on his last activity (ala Twitter) or post the title of the song he&rsquo;s listening right now, scores,
rankings and whatnot.</p>
					</div>
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						
						

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/name">&nbsp;&nbsp;name</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/variables">&nbsp;&nbsp;variables</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/id">&nbsp;&nbsp;id</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/isBlocked">&nbsp;&nbsp;isBlocked</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/isTemp">&nbsp;&nbsp;isTemp</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/isOnline">&nbsp;&nbsp;isOnline</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/nickName">&nbsp;&nbsp;nickName</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/state">&nbsp;&nbsp;state</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/containsVariable:">&ndash;&nbsp;containsVariable:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/getOfflineVariables">&ndash;&nbsp;getOfflineVariables</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/getOnlineVariables">&ndash;&nbsp;getOnlineVariables</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/getVariable:">&ndash;&nbsp;getVariable:</a></code>
	</span>
	
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Properties" name="properties"></a>
						<h2 class="subtitle subtitle-methods">Properties</h2>
						
						<div class="section-method">
	<a name="//api/name/id" title="id"></a>
	<h3 class="subsubtitle method-title">id</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The id of the Buddy
The id corresponds to the current id of the User in the system</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) NSInteger id</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The id of the Buddy
The id corresponds to the current id of the User in the system</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/isBlocked" title="isBlocked"></a>
	<h3 class="subsubtitle method-title">isBlocked</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return true if the Buddy is blocked in the current Users' BuddyList</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL isBlocked</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return true if the Buddy is blocked in the current Users' BuddyList</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/BlockBuddyRequest.html">BlockBuddyRequest</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/isOnline" title="isOnline"></a>
	<h3 class="subsubtitle method-title">isOnline</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return true if the User is online in the BuddyList system
The value is stored in a reserved Buddy Variable</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly) BOOL isOnline</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return true if the User is online in the BuddyList system
The value is stored in a reserved Buddy Variable</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/GoOnlineRequest.html">GoOnlineRequest</a></p></code></li>
			
			<li><code><p><a href="../Classes/ReservedBuddyVariables.html">ReservedBuddyVariables</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/isTemp" title="isTemp"></a>
	<h3 class="subsubtitle method-title">isTemp</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return true if the Buddy is temporary (not persistent)</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL isTemp</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return true if the Buddy is temporary (not persistent)</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/name" title="name"></a>
	<h3 class="subsubtitle method-title">name</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The name of the Buddy</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) NSString *name</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The name of the Buddy</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/nickName" title="nickName"></a>
	<h3 class="subsubtitle method-title">nickName</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>An optional Buddy nickname
The value is stored in a reserved Buddy Variable</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (weak, readonly) NSString *nickName</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>An optional Buddy nickname
The value is stored in a reserved Buddy Variable</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/ReservedBuddyVariables.html">ReservedBuddyVariables</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/state" title="state"></a>
	<h3 class="subsubtitle method-title">state</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The current Buddy custom state (e.g. &ldquo;Available&rdquo;, &ldquo;Busy&rdquo;, etc&hellip;)
The value is stored in a reserved Buddy Variable</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (weak, readonly) NSString *state</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The current Buddy custom state (e.g. &ldquo;Available&rdquo;, &ldquo;Busy&rdquo;, etc&hellip;)
The value is stored in a reserved Buddy Variable</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/ReservedBuddyVariables.html">ReservedBuddyVariables</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/variables" title="variables"></a>
	<h3 class="subsubtitle method-title">variables</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Obtain a list of BuddyVariables.
Please note that by convention any variable whose name starts with the dollar sign ($)
will be regarded as persistent and stored locally by the server.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (nonatomic, strong) NSArray *variables</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Obtain a list of BuddyVariables.
Please note that by convention any variable whose name starts with the dollar sign ($)
will be regarded as persistent and stored locally by the server.</p>

<p>These variables are also referred to as &ldquo;offline variables&rdquo; because they are available
to other Users even when the Buddy is offline.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SFSBuddyVariable.html">SFSBuddyVariable</a></p></code></li>
			
			<li><code><p><a href="../Classes/SetBuddyVariablesRequest.html">SetBuddyVariablesRequest</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Instance Methods" name="instance_methods"></a>
						<h2 class="subtitle subtitle-methods">Instance Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/containsVariable:" title="containsVariable:"></a>
	<h3 class="subsubtitle method-title">containsVariable:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return true if a BuddyVariable with the provided name exists</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (BOOL)containsVariable:(NSString *)<em>varName</em></code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return true if a BuddyVariable with the provided name exists</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/getOfflineVariables" title="getOfflineVariables"></a>
	<h3 class="subsubtitle method-title">getOfflineVariables</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return a list of offline Buddy Variables</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (NSArray *)getOfflineVariables</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return a list of offline Buddy Variables</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/getOnlineVariables" title="getOnlineVariables"></a>
	<h3 class="subsubtitle method-title">getOnlineVariables</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Return a list of non-persistent Buddy Variables</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (NSArray *)getOnlineVariables</code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Return a list of non-persistent Buddy Variables</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/getVariable:" title="getVariable:"></a>
	<h3 class="subsubtitle method-title">getVariable:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Get the BuddyVariable with the provided name.
nil is returned if not BuddyVariable exists with that name</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (id&lt;BuddyVariable&gt;)getVariable:(NSString *)<em>varName</em></code></div>

    
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Get the BuddyVariable with the provided name.
nil is returned if not BuddyVariable exists with that name</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SFSBuddy.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
                    
                    
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2014 gotoAndPlay() / A51 Integrated. All rights reserved. (Last updated: 2014-10-13)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 963)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>